//
//  HELCouponListCell.m
//  NursingAssociation
//
//  Created by macOS on 2017/3/5.
//  Copyright © 2017年 wsj2015. All rights reserved.
//

#import "HELCouponListCell.h"

@implementation HELCouponListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(HELCouponModel *)model{

    //couponActivityId = 2;
    
//    self.dateL.text = [NSString stringWithFormat:@"%@",model.expirationTime];
    
//    if ([model.status isEqualToString:@"unused"]) {
//        self.tagL.hidden = YES;
//    }else{
//         self.tagL.hidden = NO;
//    }
  
    
   
    //createTime = 1488788441000;
    //expirationTime = "<null>";
    //id = 49;
    //status = unused;
    //type = free;
    //updateTime = 1488788441000;
    //usedTime = "<null>";
    //userId = 200831002067;
    self.nameL.text = model.title;
    self.descL.text = model.desc;
    if ([model.type isEqualToString:@"free"]) {
        self.contentL.text =@"使用条件:无";
        
    }else{
      self.contentL.text= [NSString stringWithFormat:@"使用条件:满%@可用",model.fullAmount];
        self.dateL.text  =@"免费";
    }
    
    if (model.status) {
        if ([model.status isEqualToString:@"unused"]) {
            self.tagImag.image = [UIImage imageNamed:@"未使用"];
        }else if([model.status isEqualToString:@"used"]){
            self.tagImag.image = [UIImage imageNamed:@"已使用"];
        }else if ([model.status isEqualToString:@"freeze"]){
            self.tagImag.image = [UIImage imageNamed:@"使用中"];
        }else{
            self.tagImag.image = nil;
        }
    }
    
    


}

@end
